﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Brainee.Search
{
  /// <summary>
  /// Provides properties used to define a state within a search algorithm.
  /// </summary>
  /// <remarks>
  /// Defined in AIMA, 2nd ed., p69.
  /// </remarks>
  public interface ISearchState
  {
    /// <summary>
    /// The state in the problem state space to which this search state corresponds.
    /// </summary>
    IState State { get; }

    /// <summary>
    /// The state in the search algorithm that generated this state.
    /// </summary>
    ISearchState Parent { get; }

    /// <summary>
    /// The action that was applied to the parent to generate this state.
    /// </summary>
    IAction Action { get; }

    /// <summary>
    /// The total cost of the path from the initial state to this node.
    /// </summary>
    double PathCost { get; }

    /// <summary>
    /// The number of steps along the path from the initial state.
    /// </summary>
    UInt32 Depth { get; }
  }
}
